package com.example.oop.POJO;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "player")
public class Player {
    @Id
    private Integer id;

    private String username;

    private Integer status; //用户状态（1准备，2对局中，3对局结束）

    private int color;  //玩家旗子颜色（黑色1，白色0）

    public Player(Integer id, String username, Integer status) {
        this.id = id;
        this.username = username;
        this.status = status;
        this.color = 0;
    }
}
